﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LanDBom.Models.Technology
{
    public class Del
    {
        LDbaseEntities LD = new LDbaseEntities();
        //删除工艺方法
        public Steelmaking Getstee(int ST_ID)
        {
            Steelmaking st = LD.Steelmaking.SingleOrDefault(x => x.ST_ID == ST_ID);
            return st;
        }
        public int DelSteelmaking(Steelmaking sett)
        {
            LD.Steelmaking.Remove(sett);
            return LD.SaveChanges();
        }



        //删除工艺
        public libray Getlib(int LB_ID)
        {
            libray lb = LD.libray.SingleOrDefault(x => x.LB_ID == LB_ID);
            return lb;
        }
        public int DelLibray(libray lib)
        {
            LD.libray.Remove(lib);
            return LD.SaveChanges();
        }



        //删除同一分类下的工艺
        public libray Getstlib(int ST_ID)
        {
            libray lb = LD.libray.SingleOrDefault(x => x.ST_ID == ST_ID);
            return lb;
        }
        public int DelStLibray(libray lib)
        {
            LD.libray.Remove(lib);
            return LD.SaveChanges();
        }
    }
}